package com.java.demo.service;

import com.java.demo.dao.UserRepository;
import com.java.demo.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserService {
    //1.属性注入
    @Resource
    private UserRepository userRepository;
    public int add(){
        System.out.println("do UserService add method");
       return userRepository.add();
    }



}
